From 4f6ea16c2e747c32e78285129df4b98b2a80c10d Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 20 Jan 2016 18:55:51 +0100 Subject: [PATCH] wayland: Protect against NULL offers on gdk_drag_status() implementation If we're called untimely, we might end up crashing here when poking the NULL wl_data_offer. --- gdk/wayland/gdkdnd-wayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/wayland/gdkdnd-wayland.c b/gdk/wayland/gdkdnd-wayland.c index 2787e5916d..cf2376df26 100644 --- a/gdk/wayland/gdkdnd-wayland.c +++ b/gdk/wayland/gdkdnd-wayland.c @@ -315,7 +315,7 @@ gdk_wayland_drag_context_drop_finish (GdkDragContext *context, selection = gdk_drag_get_selection (context); wl_offer = gdk_wayland_selection_get_offer (display, selection); - if (success && wayland_context->selected_action && + if (wl_offer && success && wayland_context->selected_action && wayland_context->selected_action != GDK_ACTION_ASK) { gdk_wayland_drag_context_commit_status (context); -- 2.30.2